import { createApp } from 'vue';
import App from './App.vue';
const Vue = createApp(App);
// 路由
import router from './router';
// 状态管理
import store from './store';
// 全局样式信息
import '~/theme/assets/elcker.less';

// 项目构建
import ElckerBuild from '~/ElckerBuild';

// 为啥引入？ https://blog.csdn.net/weixin_40716786/article/details/90045802
import 'default-passive-events';

const EAdminInit = async (): Promise<void> => {
  Vue.use(store);
  Vue.use(router);
  ElckerBuild(Vue);
  // Mount when the route is ready
  // https://next.router.vuejs.org/api/#isready
  await router.isReady();
  Vue.mount('#app', true);
};

void EAdminInit();
